package com.d3works.apps.account.service;

import com.d3works.apps.account.db.Move;
import com.d3works.apps.account.db.PaymentMode;
import com.d3works.apps.account.db.PaymentSchedule;
import com.d3works.apps.account.db.PaymentScheduleLine;
import com.d3works.apps.base.db.BankDetails;
import com.d3works.exception.D3worksException;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;

public interface PaymentScheduleLineService {

  PaymentScheduleLine createPaymentScheduleLine(
      PaymentSchedule paymentSchedule,
      BigDecimal inTaxAmount,
      int scheduleLineSeq,
      LocalDate scheduleDate);

  List<PaymentScheduleLine> createPaymentScheduleLines(PaymentSchedule paymentSchedule);

  /**
   * Create a payment move for a payment schedule line with the given company bank details.
   *
   * @param paymentScheduleLine
   * @param companyBankDetails
   * @param paymentMode
   * @return
   * @throws D3worksException
   */
  Move createPaymentMove(
      PaymentScheduleLine paymentScheduleLine,
      BankDetails companyBankDetails,
      PaymentMode paymentMode)
      throws D3worksException;
}
